The present disclosure relates generally to manipulating shaders described in a non-object-oriented programming language using object-oriented programming.
This section is intended to introduce the reader to various aspects of art that may be related to various aspects of the present disclosure, which are described and/or claimed below. This discussion is believed to be helpful in providing the reader with background information to facilitate a better understanding of the various aspects of the present disclosure. Accordingly, it should be understood that these statements are to be read in this light, and not as admissions of prior art.
In application programs, imagery of the application is often manipulated using shaders. For example, an application that renders three-dimensional (3D) display images may use shaders to customize the appearance of 3D images. The shaders may be programs written using a graphics processing unit (GPU) language, such as OpenGL Shading Language (GLSL). For example, the shaders run on the GPU and may be a feature of an OpenGL application programming interface (API).
Using the OpenGL API as an example, the OpenGL API is a low-level C language API for 3D graphics. Because the OpenGL API is a low-level API, functions of the OpenGL API are often difficult to manipulate. For example, changing a functionality of a shader within the OpenGL API requires a deep understanding of the OpenGL API. However, the subject matter of the present disclosure provides a method for manipulating the shader within the OpenGL API using objective oriented programming, such as the Objective-C language.